import { createActorContext } from '@xstate/react';
import { todosMachine } from '../machines/todosMachine';
import { getStorageItem } from '../utils/storage';

export const TodosContext = createActorContext(todosMachine, {
  state: getStorageItem('todos') || undefined
});
